﻿using System;

namespace AFT.Parking.Entity.ArgumentEntity
{
    /// <summary>
    /// 简单返回值基类
    /// </summary>
    /// <typeparam name="T">实体类型</typeparam>
    [Serializable]
    public class VoidResult<T>
    {
        /// <summary>
        /// 返回信息
        /// </summary>
        public string Message { get; set; }
        
        /// <summary>
        /// 返回结果实体对象
        /// </summary>
        public T Result { get; set; }
    }

    /// <summary>
    /// 布尔值返回类
    /// </summary>
    /// <typeparam name="T">实体类型</typeparam>
    [Serializable]
    public class BoolResult<T> : VoidResult<T>
    {
        /// <summary>
        /// 方法执行返回值
        /// </summary>
        public bool Value { get; set; }
    }

    /// <summary>
    /// 布尔值返回类
    /// </summary>
    [Serializable]
    public class BoolResult : BoolResult<object>
    { }

    /// <summary>
    /// 整数值返回类
    /// </summary>
    /// <typeparam name="T">实体类型</typeparam>
    [Serializable]
    public class IntResult<T> : VoidResult<T>
    {
        /// <summary>
        /// 方法执行返回值
        /// </summary>
        public int Value { get; set; }
    }

    /// <summary>
    /// 整数值返回类
    /// </summary>
    [Serializable]
    public class IntResult : IntResult<object>
    { }
}
